package com.spring.factory;

import com.spring.pojo.Person;
import org.springframework.beans.factory.FactoryBean;

public class FactoryBeanDemo implements FactoryBean<Person> {
    /**
     * 创建一个工厂类，返回一个对象
     */
    @Override
    public Person getObject() throws Exception {
        return new Person("赵六",20,"女");
    }

    @Override
    public Class<?> getObjectType() {
        return Person.class;
    }
}
